package services

import (
	"rustdesk_api_server/global"
	"rustdesk_api_server/models"
)

var Users = new(UserSerivce)

type UserSerivce struct{}

func (u *UserSerivce) GetByUserId(id uint) (models.User, error) {
	var user models.User
	user.ID = id
	err := global.DB.First(&user).Error
	return user, err
}
